package edu.cmu.atlub.persistence;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionManager {
    
    public static final String DB_URL = "jdbc:mysql://islpc2.is.cs.cmu.edu:3306/";
    public static final String DB_NAME = "social_media";
    public static final String DB_DRIVER = "com.mysql.jdbc.Driver";
    public static final String DB_USERNAME = "smuser";
    public static final String DB_PASSWORD = "socialmedia";
    
    public static Connection getConnection() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {
	Class.forName(DB_DRIVER).newInstance();
	Connection con = DriverManager.getConnection(DB_URL + DB_NAME, DB_USERNAME, DB_PASSWORD);
	return con;
    }


}
